<table id="tb_ress" class="bordertable">
    <thead>
    <tr>
        <th>序号</th>
        <th>资源编号</th>
        <th>安装地址</th>
        <th>光站端口</th>
        <th>资源类型</th>
        <th>资源型号</th>
        <th>小区名称</th>
        <th>上级资源</th>
        <th>资产编号</th>
        <th>SN</th>
        <th>备注</th>

    </tr>
    </thead>
    <tbody>
    {% for res in ress %}
    <tr>
        <td>{{ loop.index+(page-1)*25 }}</td>
        <td>{{ res.ResID }}</td>
        <td><a href="{{ url_for('res',resid=res.ResID) }}" target="_blank">{{ res.InstallAddress }}</a></td>
        <td>{{ res.OSPort or '' }}</td>
        <td>{{ res.DeviceType }}</td>
        <td>{{ res.DeviceName }}</td>
        <td>{{ res.CommunityName }}</td>
        <td><a href="{{ url_for('res',resid=res.ParentRes) }}" target="_blank">{{ res.pInstallAddress or '' }}</a></td>
        <td>{{ res.AssetNumber or '' }}</td>
        <td>{{ res.SN or '' }}</td>
        <td>{{ res.Memo or '' }}</td>
    </tr>
    {% endfor %}
    </tbody>
</table>
<div>
                <span id="pagebar">
                    查询到 {{ rows }} 条记录
                    {% if page|int >1 %}
                        <a href="#" id="1">首页</a> <a href="#" id="{{ page|int-1 }}">上一页</a>
                    {% endif %}
                    {% if not (page|int>=pages or pages|int==0) %}
                        <a href="#" id="{{ page|int+1 }}">下一页</a> <a href="#" id="{{ pages }}">尾页</a>
                    {% endif %}
                    第 {{ page }} 页 / 共 {{ pages }} 页
                    转到 <input id="page_val" type="text" size="2" value="{{ page }}" />
                    <input id="page_go" type="button" value="Go" />

                </span>
</div>
